package com.imau.common.entiry;

import lombok.Getter;

@Getter
public enum ResultCode {
    //成功代码
    SUCCESS(true,200,"操作成功！"),
    //---系统错误返回码-----
    SERVER_ERROR(false,500,"系统异常"),
    FAIL(false,201,"操作失败"),
    UNAUTHENTICATED(false,10002,"您还未登录"),
    UNAUTHORISE(false,10003,"权限不足"),
    ILLEGAL_REQUEST(false,205, "非法请求"),
    USERNAMEORPASSWORD_ERROR(false,202, "用户名密码错误"),

    ;
    private boolean success;
    private int code;
    private String message;
    ResultCode(boolean success, int code, String messge) {
        this.success =success;
        this.code= code;
        this.message =messge;
    }

    public boolean getSuccess() {
        return success;
    }
}
